# -*- coding:utf8 -*-
import happybase
import time

connection = happybase.Connection('10.36.8.139')
connection.open()

#  create table
# connection.create_table(
#     'mytable',
#     {'cf1': dict(max_versions=10),
#      'cf2': dict(max_versions=1, block_cache_enabled=False),
#      'cf3': dict(),  # use defaults
#     }
# )
time1 =time. time()
table = connection.table('mytable')
for i in xrange(1000):
    table.put(b'row-key', {b'cf1:qual1': b'cf1a1v1',
                        b'cf2:qual1': b'cf2a1v1',
                       b'cf3:qual1': b'cf3a1v1'})

# row = table.row(b'row-key')
# print(row[b'cf1:qual1'])                      
# print connection.tables()
print time.time()-time1